<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: /HElib/include/helib/recryption.h Source File</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_d0c4ae63660968bf6b1c77a1e8aecf95.html">helib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">recryption.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="recryption_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/* Copyright (C) 2012-2020 IBM Corp.</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * This program is Licensed under the Apache License, Version 2.0</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> * (the &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *   http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing, software</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,</span></div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> * See the License for the specific language governing permissions and</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> * limitations under the License. See accompanying LICENSE file.</span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#ifndef HELIB_RECRYPTION_H</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="preprocessor">#define HELIB_RECRYPTION_H</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160; </div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="_numb_th_8h.html">helib/NumbTh.h</a>&gt;</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacehelib.html">helib</a> {</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">long</span> <a class="code" href="namespacehelib.html#a6a63df2a7e377c38ac5d33853caff325">thinRecrypt_initial_level</a>;</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">long</span> <a class="code" href="namespacehelib.html#a369c8e1d9a3a6012dba0e881be855ab6">fhe_force_chen_han</a>;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">long</span> <a class="code" href="namespacehelib.html#a244137dad8f49e984df751ef5d044f4c">printFlag</a>;</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160; </div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">class </span>PAlgebraMod;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="keyword">class </span>EncryptedArray;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="keyword">class </span>EvalMap;</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="keyword">class </span>ThinEvalMap;</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="keyword">class </span>PowerfulDCRT;</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="keyword">class </span>Context;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="keyword">class </span>PubKey;</div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="classhelib_1_1_recrypt_data.html">   36</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_recrypt_data.html">RecryptData</a></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;{</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00040"></a><span class="lineno"><a class="line" href="classhelib_1_1_recrypt_data.html#a0b65687a076a654d2440ce855a996a55">   40</a></span>&#160;  <span class="keyword">static</span> constexpr <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_recrypt_data.html#a0b65687a076a654d2440ce855a996a55">defSkHwt</a> = 100;</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="classhelib_1_1_recrypt_data.html#ad0ee7fe41372bfe6bce9c6191936558d">   43</a></span>&#160;  NTL::Vec&lt;long&gt; <a class="code" href="classhelib_1_1_recrypt_data.html#ad0ee7fe41372bfe6bce9c6191936558d">mvec</a>; </div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160; </div>
<div class="line"><a name="l00046"></a><span class="lineno"><a class="line" href="classhelib_1_1_recrypt_data.html#a66807ea874b230dab34464d591cd0fd2">   46</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_recrypt_data.html#a0d3b37785a0bf499c5d51ae43fa40442">e</a>, <a class="code" href="classhelib_1_1_recrypt_data.html#a66807ea874b230dab34464d591cd0fd2">ePrime</a>;</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160; </div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="classhelib_1_1_recrypt_data.html#a6e9384f58128b7a75b9a1f66842fbb5b">   49</a></span>&#160;  <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_recrypt_data.html#a6e9384f58128b7a75b9a1f66842fbb5b">skHwt</a>;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classhelib_1_1_recrypt_data.html#aa33d0f2a11a834d4c4eda0cd4513b3c0">   52</a></span>&#160;  std::shared_ptr&lt;const PAlgebraMod&gt; <a class="code" href="classhelib_1_1_recrypt_data.html#aa33d0f2a11a834d4c4eda0cd4513b3c0">alMod</a>;</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classhelib_1_1_recrypt_data.html#ae0199b0be0a64b8ca3ed11add68a422a">   55</a></span>&#160;  std::shared_ptr&lt;const EncryptedArray&gt; <a class="code" href="classhelib_1_1_recrypt_data.html#ae0199b0be0a64b8ca3ed11add68a422a">ea</a>;</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classhelib_1_1_recrypt_data.html#a751677dedcf8b3bf9555f4b2010d53a1">   57</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_recrypt_data.html#a751677dedcf8b3bf9555f4b2010d53a1">build_cache</a>;</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160; </div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classhelib_1_1_recrypt_data.html#a4a9744053d8610875010e5aaacfdcbb4">   60</a></span>&#160;  std::shared_ptr&lt;const EvalMap&gt; <a class="code" href="classhelib_1_1_recrypt_data.html#a6b70f57f75e65a4ac1de6526b18448b6">firstMap</a>, <a class="code" href="classhelib_1_1_recrypt_data.html#a4a9744053d8610875010e5aaacfdcbb4">secondMap</a>;</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160; </div>
<div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classhelib_1_1_recrypt_data.html#a6f591f194637b52ff8581bd0d619785d">   63</a></span>&#160;  std::shared_ptr&lt;const PowerfulDCRT&gt; <a class="code" href="classhelib_1_1_recrypt_data.html#a6f591f194637b52ff8581bd0d619785d">p2dConv</a>;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classhelib_1_1_recrypt_data.html#adbcaafe2ca9085b14d3f78112954db3d">   66</a></span>&#160;  std::vector&lt;NTL::ZZX&gt; <a class="code" href="classhelib_1_1_recrypt_data.html#adbcaafe2ca9085b14d3f78112954db3d">unpackSlotEncoding</a>;</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160; </div>
<div class="line"><a name="l00068"></a><span class="lineno"><a class="line" href="classhelib_1_1_recrypt_data.html#aa6277f27e3e7d5171b4afbef7600f2a0">   68</a></span>&#160;  <a class="code" href="classhelib_1_1_recrypt_data.html#aa6277f27e3e7d5171b4afbef7600f2a0">RecryptData</a>()</div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;  {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <a class="code" href="classhelib_1_1_recrypt_data.html#a6e9384f58128b7a75b9a1f66842fbb5b">skHwt</a> = 0;</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <a class="code" href="classhelib_1_1_recrypt_data.html#a0d3b37785a0bf499c5d51ae43fa40442">e</a> = <a class="code" href="classhelib_1_1_recrypt_data.html#a66807ea874b230dab34464d591cd0fd2">ePrime</a> = 0;</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;    <a class="code" href="classhelib_1_1_recrypt_data.html#a751677dedcf8b3bf9555f4b2010d53a1">build_cache</a> = <span class="keyword">false</span>;</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;  }</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_recrypt_data.html#ab115b88319d1a7a13695b3ac795e49ae">init</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_context.html">Context</a>&amp; context,</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;            <span class="keyword">const</span> NTL::Vec&lt;long&gt;&amp; mvec_,</div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;            <span class="keywordtype">bool</span> enableThick, <span class="comment">/*init linear transforms for non-thin*/</span></div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;            <span class="keywordtype">long</span> t = 0 <span class="comment">/*min Hwt for sk*/</span>,</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;            <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_recrypt_data.html#a751677dedcf8b3bf9555f4b2010d53a1">build_cache</a> = <span class="keyword">false</span>,</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;            <span class="keywordtype">bool</span> minimal = <span class="keyword">false</span>);</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160; </div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_recrypt_data.html#a255cbdf26af1c7606518ae3f729bc8e1">operator==</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_recrypt_data.html">RecryptData</a>&amp; other) <span class="keyword">const</span>;</div>
<div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classhelib_1_1_recrypt_data.html#a9862878fd33509054505fea1b2bdd9fa">   84</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_recrypt_data.html#a9862878fd33509054505fea1b2bdd9fa">operator!=</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_recrypt_data.html">RecryptData</a>&amp; other)<span class="keyword"> const</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="keyword">  </span>{</div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;    <span class="keywordflow">return</span> !(<a class="code" href="classhelib_1_1_recrypt_data.html#a255cbdf26af1c7606518ae3f729bc8e1">operator==</a>(other));</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;  }</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160; </div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;  <span class="keyword">static</span> <span class="keywordtype">long</span> <a class="code" href="classhelib_1_1_recrypt_data.html#addbf93ded576a07c96bb03ecb5d4283f">setAE</a>(<span class="keywordtype">long</span>&amp; <a class="code" href="classhelib_1_1_recrypt_data.html#a0d3b37785a0bf499c5d51ae43fa40442">e</a>, <span class="keywordtype">long</span>&amp; <a class="code" href="classhelib_1_1_recrypt_data.html#a66807ea874b230dab34464d591cd0fd2">ePrime</a>, <span class="keyword">const</span> <a class="code" href="classhelib_1_1_context.html">Context</a>&amp; context, <span class="keywordtype">long</span> t = 0);</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;};</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160; </div>
<div class="line"><a name="l00122"></a><span class="lineno"><a class="line" href="classhelib_1_1_thin_recrypt_data.html">  122</a></span>&#160;<span class="keyword">class </span><a class="code" href="classhelib_1_1_thin_recrypt_data.html">ThinRecryptData</a> : <span class="keyword">public</span> <a class="code" href="classhelib_1_1_recrypt_data.html">RecryptData</a></div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;{</div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00126"></a><span class="lineno"><a class="line" href="classhelib_1_1_thin_recrypt_data.html#a211ff46c81a34f04e3ed379b361acbbb">  126</a></span>&#160;  std::shared_ptr&lt;const ThinEvalMap&gt; <a class="code" href="classhelib_1_1_thin_recrypt_data.html#a911786f6a961e6700fa0563ecb951699">coeffToSlot</a>, <a class="code" href="classhelib_1_1_thin_recrypt_data.html#a211ff46c81a34f04e3ed379b361acbbb">slotToCoeff</a>;</div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classhelib_1_1_thin_recrypt_data.html#accba45a87da96c0545b19c82d20c2da0">init</a>(<span class="keyword">const</span> <a class="code" href="classhelib_1_1_context.html">Context</a>&amp; context,</div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;            <span class="keyword">const</span> NTL::Vec&lt;long&gt;&amp; mvec_,</div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;            <span class="keywordtype">bool</span> alsoThick, <span class="comment">/*init linear transforms also for non-thin*/</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;            <span class="keywordtype">long</span> t = 0 <span class="comment">/*min Hwt for sk*/</span>,</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;            <span class="keywordtype">bool</span> <a class="code" href="classhelib_1_1_recrypt_data.html#a751677dedcf8b3bf9555f4b2010d53a1">build_cache</a> = <span class="keyword">false</span>,</div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;            <span class="keywordtype">bool</span> minimal = <span class="keyword">false</span>);</div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;};</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160; </div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;<span class="preprocessor">#define HELIB_MIN_CAP_FRAC (2.0 / 3.0)</span></div>
<div class="line"><a name="l00138"></a><span class="lineno"><a class="line" href="recryption_8h.html#a3c98409123b748713afe9eec26d019e5">  138</a></span>&#160;<span class="comment">// Used in calculation of &quot;min capacity&quot;.</span></div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<span class="comment">// This could be set to 1.0, but just to be on the safe side,</span></div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;<span class="comment">// it is set to 2/3.  If we did set it to 1, the min capacity</span></div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;<span class="comment">// would increase by less than 6/10 of a bit.</span></div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160; </div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;} <span class="comment">// namespace helib</span></div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160; </div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;<span class="preprocessor">#endif // HELIB_RECRYPTION_H</span></div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="aclasshelib_1_1_thin_recrypt_data_html"><div class="ttname"><a href="classhelib_1_1_thin_recrypt_data.html">helib::ThinRecryptData</a></div><div class="ttdoc">Same as above, but for &quot;thin&quot; bootstrapping, where the slots are assumed to contain constants.</div><div class="ttdef"><b>Definition:</b> recryption.h:123</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_a255cbdf26af1c7606518ae3f729bc8e1"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#a255cbdf26af1c7606518ae3f729bc8e1">helib::RecryptData::operator==</a></div><div class="ttdeci">bool operator==(const RecryptData &amp;other) const</div><div class="ttdef"><b>Definition:</b> recryption.cpp:265</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_ab115b88319d1a7a13695b3ac795e49ae"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#ab115b88319d1a7a13695b3ac795e49ae">helib::RecryptData::init</a></div><div class="ttdeci">void init(const Context &amp;context, const NTL::Vec&lt; long &gt; &amp;mvec_, bool enableThick, long t=0, bool build_cache=false, bool minimal=false)</div><div class="ttdoc">Initialize the recryption data in the context.</div><div class="ttdef"><b>Definition:</b> recryption.cpp:276</div></div>
<div class="ttc" id="aclasshelib_1_1_thin_recrypt_data_html_accba45a87da96c0545b19c82d20c2da0"><div class="ttname"><a href="classhelib_1_1_thin_recrypt_data.html#accba45a87da96c0545b19c82d20c2da0">helib::ThinRecryptData::init</a></div><div class="ttdeci">void init(const Context &amp;context, const NTL::Vec&lt; long &gt; &amp;mvec_, bool alsoThick, long t=0, bool build_cache=false, bool minimal=false)</div><div class="ttdoc">Initialize the recryption data in the context.</div><div class="ttdef"><b>Definition:</b> recryption.cpp:771</div></div>
<div class="ttc" id="a_numb_th_8h_html"><div class="ttname"><a href="_numb_th_8h.html">NumbTh.h</a></div><div class="ttdoc">Miscellaneous utility functions.</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_a0b65687a076a654d2440ce855a996a55"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#a0b65687a076a654d2440ce855a996a55">helib::RecryptData::defSkHwt</a></div><div class="ttdeci">static constexpr long defSkHwt</div><div class="ttdoc">default Hamming weight of recryption key</div><div class="ttdef"><b>Definition:</b> recryption.h:40</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_a6e9384f58128b7a75b9a1f66842fbb5b"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#a6e9384f58128b7a75b9a1f66842fbb5b">helib::RecryptData::skHwt</a></div><div class="ttdeci">long skHwt</div><div class="ttdoc">Hamming weight of recryption secret key.</div><div class="ttdef"><b>Definition:</b> recryption.h:49</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_adbcaafe2ca9085b14d3f78112954db3d"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#adbcaafe2ca9085b14d3f78112954db3d">helib::RecryptData::unpackSlotEncoding</a></div><div class="ttdeci">std::vector&lt; NTL::ZZX &gt; unpackSlotEncoding</div><div class="ttdoc">linPolys for unpacking the slots</div><div class="ttdef"><b>Definition:</b> recryption.h:66</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_a6b70f57f75e65a4ac1de6526b18448b6"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#a6b70f57f75e65a4ac1de6526b18448b6">helib::RecryptData::firstMap</a></div><div class="ttdeci">std::shared_ptr&lt; const EvalMap &gt; firstMap</div><div class="ttdoc">linear maps</div><div class="ttdef"><b>Definition:</b> recryption.h:60</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_a751677dedcf8b3bf9555f4b2010d53a1"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#a751677dedcf8b3bf9555f4b2010d53a1">helib::RecryptData::build_cache</a></div><div class="ttdeci">bool build_cache</div><div class="ttdef"><b>Definition:</b> recryption.h:57</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_aa33d0f2a11a834d4c4eda0cd4513b3c0"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#aa33d0f2a11a834d4c4eda0cd4513b3c0">helib::RecryptData::alMod</a></div><div class="ttdeci">std::shared_ptr&lt; const PAlgebraMod &gt; alMod</div><div class="ttdoc">for plaintext space p^{e-e'+r}</div><div class="ttdef"><b>Definition:</b> recryption.h:52</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_aa6277f27e3e7d5171b4afbef7600f2a0"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#aa6277f27e3e7d5171b4afbef7600f2a0">helib::RecryptData::RecryptData</a></div><div class="ttdeci">RecryptData()</div><div class="ttdef"><b>Definition:</b> recryption.h:68</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_ae0199b0be0a64b8ca3ed11add68a422a"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#ae0199b0be0a64b8ca3ed11add68a422a">helib::RecryptData::ea</a></div><div class="ttdeci">std::shared_ptr&lt; const EncryptedArray &gt; ea</div><div class="ttdoc">for plaintext space p^{e-e'+r}</div><div class="ttdef"><b>Definition:</b> recryption.h:55</div></div>
<div class="ttc" id="anamespacehelib_html_a6a63df2a7e377c38ac5d33853caff325"><div class="ttname"><a href="namespacehelib.html#a6a63df2a7e377c38ac5d33853caff325">helib::thinRecrypt_initial_level</a></div><div class="ttdeci">long thinRecrypt_initial_level</div></div>
<div class="ttc" id="anamespacehelib_html"><div class="ttname"><a href="namespacehelib.html">helib</a></div><div class="ttdef"><b>Definition:</b> apiAttributes.h:21</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_addbf93ded576a07c96bb03ecb5d4283f"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#addbf93ded576a07c96bb03ecb5d4283f">helib::RecryptData::setAE</a></div><div class="ttdeci">static long setAE(long &amp;e, long &amp;ePrime, const Context &amp;context, long t=0)</div><div class="ttdoc">Helper function for computing the recryption parameters.</div><div class="ttdef"><b>Definition:</b> recryption.cpp:199</div></div>
<div class="ttc" id="anamespacehelib_html_a369c8e1d9a3a6012dba0e881be855ab6"><div class="ttname"><a href="namespacehelib.html#a369c8e1d9a3a6012dba0e881be855ab6">helib::fhe_force_chen_han</a></div><div class="ttdeci">long fhe_force_chen_han</div><div class="ttdef"><b>Definition:</b> recryption.cpp:790</div></div>
<div class="ttc" id="aclasshelib_1_1_thin_recrypt_data_html_a211ff46c81a34f04e3ed379b361acbbb"><div class="ttname"><a href="classhelib_1_1_thin_recrypt_data.html#a211ff46c81a34f04e3ed379b361acbbb">helib::ThinRecryptData::slotToCoeff</a></div><div class="ttdeci">std::shared_ptr&lt; const ThinEvalMap &gt; slotToCoeff</div><div class="ttdef"><b>Definition:</b> recryption.h:126</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_a4a9744053d8610875010e5aaacfdcbb4"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#a4a9744053d8610875010e5aaacfdcbb4">helib::RecryptData::secondMap</a></div><div class="ttdeci">std::shared_ptr&lt; const EvalMap &gt; secondMap</div><div class="ttdef"><b>Definition:</b> recryption.h:60</div></div>
<div class="ttc" id="aclasshelib_1_1_context_html"><div class="ttname"><a href="classhelib_1_1_context.html">helib::Context</a></div><div class="ttdoc">Maintaining the parameters.</div><div class="ttdef"><b>Definition:</b> Context.h:58</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_a6f591f194637b52ff8581bd0d619785d"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#a6f591f194637b52ff8581bd0d619785d">helib::RecryptData::p2dConv</a></div><div class="ttdeci">std::shared_ptr&lt; const PowerfulDCRT &gt; p2dConv</div><div class="ttdoc">conversion between ZZX and Powerful</div><div class="ttdef"><b>Definition:</b> recryption.h:63</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_a66807ea874b230dab34464d591cd0fd2"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#a66807ea874b230dab34464d591cd0fd2">helib::RecryptData::ePrime</a></div><div class="ttdeci">long ePrime</div><div class="ttdef"><b>Definition:</b> recryption.h:46</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_ad0ee7fe41372bfe6bce9c6191936558d"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#ad0ee7fe41372bfe6bce9c6191936558d">helib::RecryptData::mvec</a></div><div class="ttdeci">NTL::Vec&lt; long &gt; mvec</div><div class="ttdoc">Some data members that are only used for I/O.</div><div class="ttdef"><b>Definition:</b> recryption.h:43</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html">helib::RecryptData</a></div><div class="ttdoc">A structure to hold recryption-related data inside the Context.</div><div class="ttdef"><b>Definition:</b> recryption.h:37</div></div>
<div class="ttc" id="aclasshelib_1_1_thin_recrypt_data_html_a911786f6a961e6700fa0563ecb951699"><div class="ttname"><a href="classhelib_1_1_thin_recrypt_data.html#a911786f6a961e6700fa0563ecb951699">helib::ThinRecryptData::coeffToSlot</a></div><div class="ttdeci">std::shared_ptr&lt; const ThinEvalMap &gt; coeffToSlot</div><div class="ttdoc">linear maps</div><div class="ttdef"><b>Definition:</b> recryption.h:126</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_a0d3b37785a0bf499c5d51ae43fa40442"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#a0d3b37785a0bf499c5d51ae43fa40442">helib::RecryptData::e</a></div><div class="ttdeci">long e</div><div class="ttdoc">partition of m into co-prime factors</div><div class="ttdef"><b>Definition:</b> recryption.h:46</div></div>
<div class="ttc" id="aclasshelib_1_1_recrypt_data_html_a9862878fd33509054505fea1b2bdd9fa"><div class="ttname"><a href="classhelib_1_1_recrypt_data.html#a9862878fd33509054505fea1b2bdd9fa">helib::RecryptData::operator!=</a></div><div class="ttdeci">bool operator!=(const RecryptData &amp;other) const</div><div class="ttdef"><b>Definition:</b> recryption.h:84</div></div>
<div class="ttc" id="anamespacehelib_html_a244137dad8f49e984df751ef5d044f4c"><div class="ttname"><a href="namespacehelib.html#a244137dad8f49e984df751ef5d044f4c">helib::printFlag</a></div><div class="ttdeci">long printFlag</div></div>
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
